package com.steakliu.sun.disuse;

import com.steakliu.sun.disuse.api.ConnectionsInfo;
import com.steakliu.sun.disuse.api.DisuseStrategy;
import com.steakliu.sun.spi.annotation.Join;

import java.util.List;

/**
 * 功能说明：
 * <p>
 * Original @Author: steakliu-刘牌, 2023-02-06  23:24
 * <p>
 * Copyright (C)2020-2022  steakliu All rights reserved.
 */
@Join
public class LastDisuseStrategy implements DisuseStrategy {
    @Override
    public ConnectionsInfo selectConnection(List<ConnectionsInfo> connectionsInfoList) {
        return connectionsInfoList.get(connectionsInfoList.size() - 1);
    }
}
